home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / hity wydania / Ubuntu 9.10 PL / karmelkowy-koliberek-desktop-9.10-i386-PL.iso / casper / filesystem.squashfs / usr / share / locales / remove-language-pack < prev   
Text File  |  2009-10-14  |  634b  |  26 lines

  1. #!/bin/sh -e
  2.  
  3. if [ -z "$1" ]; then
  4.     echo "Usage: $0 <language code> <class> [<version>]"
  5.     exit 0
  6. fi
  7.  
  8. # remove binary locales
  9. # do nothing for gnome/kde
  10. if [ -z "$2" ]; then
  11.     # do not remove locales if we merely remove language-support-* without
  12.     # removing language-pack-*
  13.     if [ ! -e /var/lib/locales/supported.d/$1 ]; then
  14.     rm -rf /usr/lib/locale/$1 /usr/lib/locale/$1[._@]*
  15.     fi
  16. fi
  17.  
  18. # reload gdm to make it aware of new locales
  19. if [ -x /etc/init.d/gdm ]; then
  20.     if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
  21.         invoke-rc.d gdm reload || exit 0
  22.     else
  23.         /etc/init.d/gdm reload || exit 0
  24.     fi
  25. fi
  26.